package util;

import java.io.File;

/**
 * 上传门店图标的时候删除原来的图标
 * @author oahner
 * @create 2022-04-20 18:55
 */
public class DeleteFile {

    public static boolean delStoreLogo(String oldFileName){
        String path = "D://finally/picture";
        if(oldFileName!=null && !"".equals(oldFileName)) {
            File oldTargetFile = new File(path, oldFileName);
            if (oldTargetFile.isFile() && oldTargetFile.exists()) {
                oldTargetFile.delete();
                return true;
            }
        }
        return false;
    }


}
